﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Medianamik.Core.ImportExport;

namespace Medianamik.UI.ImportExportManagement
{
    public partial class ImportNodes : Medianamik.UI.BasePage 
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void btnImport_Click(object sender, EventArgs e)
        {
            JSonNodeDataSourceSerializer serializer = new JSonNodeDataSourceSerializer();
            var data = serializer.Deserialize(txtJson.Text);

            NodeDataSourceImporter importer = new NodeDataSourceImporter();
            importer.ImportData(data);

        }
    }
}
